#define  _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{
	double n = 1;
	double pi = 0, zeng = 1;
	double eps;
	scanf("%le", &eps);
	while (zeng >= eps)
	{
		pi = pi + zeng;
		zeng = zeng * n / (2 * n + 1);
		n++;
	}
	pi = pi + zeng;
	printf("PI = %.5f", 2 * pi);
	return 0;
}